package com.qk.mangement.mapper;

import com.qk.dto.role.RoleDTo;
import com.qk.entity.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Date:2025/10/9
 * Author:zxc
 * Description
 */
@Mapper
public interface RoleMapper {

    /**
     * 根据角色label查询角色
     * @param roleLabel 角色label
     * @return Role
     */
    @Select("select * from role where label = #{roleLabel}")
    Role selectByLabel(String roleLabel);

    @Select("select * from role where id = #{roleId}")
    Role selectById(Integer roleId);

    List<Role> queryAll();

    List<Role> queryPage(RoleDTo roleDTO);

    void deleteById(Integer id);

    void insert(Role role);

    Role getById(Integer id);

    void update(Role role);


}
